package test;

public class testmain {
    public static void main(String[] args) {
        // 创建教师
        Teacher teacher1 = new Teacher("T001", "A老师", "男");
        Teacher teacher2 = new Teacher("T002", "B老师", "女");

        // 创建课程
        Course course1 = new Course("C001", "Java", "教101", "周一第一时段");
        Course course2 = new Course("C002", "大学物理", "主楼1702", "周三第二时段");

        // 教师开课
        System.out.println("教师开课情况：");
        teacher1.setCourse(course1);
        teacher2.setCourse(course2);
        course1.setTeacher(teacher1);
        course2.setTeacher(teacher2);

        // 创建学生
        Student student1 = new Student("S001", "李华", "男");
        Student student2 = new Student("S002", "张红", "女");

        // 学生选课
        System.out.println("\n学生选课情况:");
        student1.yesCourse(course1);
        student2.yesCourse(course2);

        // 打印学生课表
        System.out.println("\n李华的课表:");
        student1.printCourseSchedule();
        System.out.println("\n张红的课表:");
        student2.printCourseSchedule();

        // 学生退课
        System.out.println("\n学生退课情况(张红退课):");
        student2.noCourse();

        // 打印学生课表
        System.out.println("\n张红的课表:");
        student2.printCourseSchedule();
    }
}